/**
 * ApplicationException contains all the exception classes
 *
 * @author Color Lee
 * 
 */

@SuppressWarnings("serial")
class ElementNotFoundException extends RuntimeException{
	/**
     * Sets up this exception with an appropriate message.
     * @param collection the name of the collection
     */
	public ElementNotFoundException (String collection)
    {
	    super ("The target element is not in this " + collection);
    }
}

@SuppressWarnings("serial")
class EmptyCollectionException extends RuntimeException{
    /**
     * Sets up this exception with an appropriate message.
     * @param collection the name of the collection
     */
    public EmptyCollectionException (String collection)
    {
        super ("The " + collection + " is empty.");
    }
}

@SuppressWarnings("serial")
class NonComparableElementException extends RuntimeException{
    /**
     * Sets up this exception with an appropriate message.
     * @param collection  the exception message to deliver
     */
    public NonComparableElementException (String collection)
    {
        super ("The " + collection + " requires comparable elements.");
    }
}

@SuppressWarnings("serial")
class IntegerParseException extends RuntimeException{
	/**
     * Sets up this exception with an appropriate message.
     * @param collection  the exception message to deliver
     */
    public IntegerParseException (String element)
    {
        super ("The element " + element + " is not an integer.");
    }
}

@SuppressWarnings("serial")
class IncorrectInputException extends RuntimeException{
	/**
     * Sets up this exception with an appropriate message.
     * @param collection  the exception message to deliver
     */
	private String message = "Wrong Input.";
    public IncorrectInputException (String message)
    {
    	super (message);
    	this.message = message;
    }
    
    public String toString(){ return message; }
}
